function getTimeNow() {
    var time = new Date();
    var hour = time.getHours();
    var minute = time.getMinutes();
    var second = time.getSeconds();

    var week;
    var date;
    if (time.getDay() == 0) week = "星期天";
    if (time.getDay() == 1) week = "星期一";
    if (time.getDay() == 2) week = "星期二";
    if (time.getDay() == 3) week = "星期三";
    if (time.getDay() == 4) week = "星期四";
    if (time.getDay() == 5) week = "星期五";
    if (time.getDay() == 6) week = "星期六";
    date = (time.getFullYear()) + "年" + (time.getMonth() + 1) + "月" + time.getDate() + "日" + " ";

    document.getElementById("clock").innerHTML = date + week +" "+ hour + ":" + minute + ":" + second;
    setTimeout("getTimeNow()", 1000);

}

